UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dI3lESRu15bcId+9Lq7QFcEJC7CdAZdJz6lGq3ln7BA='
WHERE
key_id = '67b5a97a0016fe8ccb5234ad8daca9b91ca3e9f78322efc2fbb2ea188b77e799'
AND (
token = 'dI3lESRu15bcId+9Lq7QFcEJC7CdAZdJz6lGq3ln7BA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)