UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OCGUxCuT8mc4xa0/4eJCWQNz+w2tJlQVrK7u58WQ6c8='
WHERE
key_id = '53322a294829af51992d9bcbbff7a0bc81e2d4cd2fdcdef8a88db62122c6385b'
AND (
token = 'OCGUxCuT8mc4xa0/4eJCWQNz+w2tJlQVrK7u58WQ6c8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)