UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0MT0yPvWPJzd2qo4Gstfpw6KBh4s36FwKGFFUcuALqc='
WHERE
key_id = 'b725d334fa9fbceed94a8bfbd7a894ba641e72d8e99cbd4228a5a317a7a29a64'
AND (
token = '0MT0yPvWPJzd2qo4Gstfpw6KBh4s36FwKGFFUcuALqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)