UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qBO0OfwLRutgPskBxMR9+M5CcXePLPeTv2rBUqoZpoQ='
WHERE
key_id = 'f0890b7d3890cb5b68c382707eb0f48a431c0659eded4a7b77ecdcb7117b8df7'
AND (
token = 'qBO0OfwLRutgPskBxMR9+M5CcXePLPeTv2rBUqoZpoQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)