UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Y7AQZmFOqlGGS9LmFiBlqrCZO/WG94ldawJwBErd9gE=' 
WHERE 
  key_id = '043cad59a08b6afa33fd22888ecf7df1b862b6c2a8c38db6059573d87d9c2b63' 
  AND (
    token = 'Y7AQZmFOqlGGS9LmFiBlqrCZO/WG94ldawJwBErd9gE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020