UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QL5uqwqCQK/B0q7hubxFjmfOp+g6/QS/ro4Tm7lBL2g='
WHERE
key_id = 'c862db5fd9eff1f9848f1928fa80d4a5791cd361d4614ab4e3c4abb8f0bed317'
AND (
token = 'QL5uqwqCQK/B0q7hubxFjmfOp+g6/QS/ro4Tm7lBL2g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)