UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9yOES9339FTOHZ8RLcuj9Eh+3NBuCuoqVp0AgMcrYgE='
WHERE
key_id = '9e6fde5c3330d082f9925cff08164449d8797cdf469f6eb3ea36477fddf9d547'
AND (
token = '9yOES9339FTOHZ8RLcuj9Eh+3NBuCuoqVp0AgMcrYgE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)