UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vljC8+Ss75Hx6d5psCNTYK5jBTwEyA/ylsEg0UjH1nA='
WHERE
key_id = '2d4e54d5f089ff7f1968b35342f8271c55890f6129954977768004f6752c15f4'
AND (
token = 'vljC8+Ss75Hx6d5psCNTYK5jBTwEyA/ylsEg0UjH1nA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)