UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'drdkdvQeaOXKwtGi8d6wkHUq92ttEZlEObvs8n//464='
WHERE
key_id = '1b49ab883ac8d226c099864c6423eb3f34d66bf9fb4361fccd3ee3765c2ffad3'
AND (
token = 'drdkdvQeaOXKwtGi8d6wkHUq92ttEZlEObvs8n//464='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)