UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YrhvruoT+RO3lMisvFdK0s8udi0I7w1aYwbtc/VQBhU='
WHERE
key_id = '0ccb07fc2b2be25e452d9395db873738021443b1fe4bf08b688d33649e62e11b'
AND (
token = 'YrhvruoT+RO3lMisvFdK0s8udi0I7w1aYwbtc/VQBhU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)