UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mk+0Pqhq5ocffQpP2jOC2Bg/Flhi+/KJu2kE3TfYdrQ='
WHERE
key_id = 'b80e8a1ad70223b7fc14c9290a7e193fd55f5b5466e61edcf9a434a4a5766a58'
AND (
token = 'Mk+0Pqhq5ocffQpP2jOC2Bg/Flhi+/KJu2kE3TfYdrQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)