UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uWNQp/3eoRvZO1dtFOfAGmPB/m0v8yAObNSyKFuzWMM='
WHERE
key_id = 'ab31aa19a1b3a85176ff98e1e3009900c9416fcad3681dfccbff59fdb92aec4a'
AND (
token = 'uWNQp/3eoRvZO1dtFOfAGmPB/m0v8yAObNSyKFuzWMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)