UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4NOHbZh41EDvc3/NXFVVo+b8RHop180/0dnEgmnqqz8='
WHERE
key_id = 'bff8cdd30cdf2eabe18836d74f097a4d0766b4d9bf741c98fffe5de101db6cdd'
AND (
token = '4NOHbZh41EDvc3/NXFVVo+b8RHop180/0dnEgmnqqz8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)