UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y/PlUw1Atet4Z5XyzNAKdxrkqD82bMyVJNz/GINVvgs='
WHERE
key_id = '78ef7e3a99a97fb326411981a5c13077504098c2eea348c8b749c8b0a1b5553a'
AND (
token = 'y/PlUw1Atet4Z5XyzNAKdxrkqD82bMyVJNz/GINVvgs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)