UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ndtfw2w2c2qZNg4IowLMx/YRcbSjXjtaTy7NjR1qNPI='
WHERE
key_id = 'eeb3fad682e2610d838d46e1644f3ed32f5faee322f3f710c16bef1eb2543a62'
AND (
token = 'Ndtfw2w2c2qZNg4IowLMx/YRcbSjXjtaTy7NjR1qNPI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)