UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0mImpur1fqEoRnDZktA/7Xz33mu3g/0bHKOOsIonVXY='
WHERE
key_id = 'b242fc530fef40ac5ef5471cfa2ecdf14846a71f2615f1176c9e2b7509b8720d'
AND (
token = '0mImpur1fqEoRnDZktA/7Xz33mu3g/0bHKOOsIonVXY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)