UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bMIkaW01HOGNWJGCGhiI2SolLbhk8+qvD7HpLDlUkKk='
WHERE
key_id = '26aec2378cea52be7505a8ec1726a75b1de156161964ffa2ec6802f3dc4ff494'
AND (
token = 'bMIkaW01HOGNWJGCGhiI2SolLbhk8+qvD7HpLDlUkKk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)