UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1dgDgwEsnPMLgOFzIAKsk3v+0/fS74pAtbhjiPW/suA='
WHERE
key_id = '6f05ba302e0eabb1284fe4d0fb29f7caa5611f773f7aaa1dd35675f810778984'
AND (
token = '1dgDgwEsnPMLgOFzIAKsk3v+0/fS74pAtbhjiPW/suA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)