UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FiEU3QBry6PBAUxpfL82qTvigd/PDR1ypArbuzA9FDA='
WHERE
key_id = 'f5e44888f5a05b9353364979839559e01ec0446eadbc39b6948217b9cde4b502'
AND (
token = 'FiEU3QBry6PBAUxpfL82qTvigd/PDR1ypArbuzA9FDA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)