UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FCusBWo3W8FScLBcbCX/GNqhsrL3Uf7ay32ViaVNA54='
WHERE
key_id = 'cce8ade40adebb660091ae6d5a8a358b63fcebcdfe6ff06a9110931024871c23'
AND (
token = 'FCusBWo3W8FScLBcbCX/GNqhsrL3Uf7ay32ViaVNA54='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)