UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+/Cdgcb+y6/A8OTSXqKG5eEtkqYRZP+yRFYUc7R5vZ0='
WHERE
key_id = 'dfbd073a0b54d4eaa13ee89dbbe7d2f99b211dc3baaf32932ebc7f09f5ff7d10'
AND (
token = '+/Cdgcb+y6/A8OTSXqKG5eEtkqYRZP+yRFYUc7R5vZ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)