UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jsYV/8TVlcXuQdiwttd1eoY4gKvc7h0ymUqQ9o2YPh4='
WHERE
key_id = 'd6fc5609a5fdc3532455690feb6d91c2daf21a1dd6d3889e8defe493986c4eac'
AND (
token = 'jsYV/8TVlcXuQdiwttd1eoY4gKvc7h0ymUqQ9o2YPh4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)