UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+FJHVzHBTaqRDROQOW7vkGLDx0Z9zhnrNUS/if2igGk='
WHERE
key_id = 'fcacddc3424659b96d7c6e851a6f5ce725c7c467b4ab1bb454ea5c90aca9c2d3'
AND (
token = '+FJHVzHBTaqRDROQOW7vkGLDx0Z9zhnrNUS/if2igGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)