UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VC4wCwspx4TgNOSQDrGM/vud8EN4QX7i2onj5QtuY7w='
WHERE
key_id = 'f60a2ff78b02a33ae119abd2f7ffa6e3a602c24f9463370bdb31379c42ee4de5'
AND (
token = 'VC4wCwspx4TgNOSQDrGM/vud8EN4QX7i2onj5QtuY7w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)