UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qmVH+y9638I+EE4MHKv070LRx3Mpb/WFpPpddKui5cE='
WHERE
key_id = 'c4f4a553e966699ead9a85e2b26ceb2871b587dbb9b5e40d818abb7f7d759e5c'
AND (
token = 'qmVH+y9638I+EE4MHKv070LRx3Mpb/WFpPpddKui5cE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)