UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fx4UjeYi0F+q8QDMTalKr3zkQSpU5Ow25/rKzpVKFfQ='
WHERE
key_id = 'f35dd76277235ffa945cf12930de3cf4c3edc018050acef72f2499d40e8c7231'
AND (
token = 'fx4UjeYi0F+q8QDMTalKr3zkQSpU5Ow25/rKzpVKFfQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)