UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V7XY5iOs+3Hvxruh3kd6vP1cDRwecDfXComWIoeLvr4='
WHERE
key_id = 'ad72c5c9e9e18096c746154af4fa3e325c295775ae8ee43c685aac111775f00d'
AND (
token = 'V7XY5iOs+3Hvxruh3kd6vP1cDRwecDfXComWIoeLvr4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)