UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MPlW597US3BlWWQeH8am41o/sOy5fl4OXih72K4rxTE='
WHERE
key_id = 'f03deccdc3d900d9409261806dacc135ced035615d4d66c9dfdcd8d195f37bd7'
AND (
token = 'MPlW597US3BlWWQeH8am41o/sOy5fl4OXih72K4rxTE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)