UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mqKjw4wwaYHZGU/OLibpw8xelJg9eo37h0ugHd5Ck4o='
WHERE
key_id = '911da7add508445c93930e72ee11ded9828f3cfd3fd476bb4ffb7a57c17dc990'
AND (
token = 'mqKjw4wwaYHZGU/OLibpw8xelJg9eo37h0ugHd5Ck4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)