UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '60RVCZizsdDJMOJgwFoIq26XnZf2AexjVgbKZFi4Y6A=' 
WHERE 
  key_id = 'fb6b3fac7beeda128c270c58899dc4182df9ce89a9c9bc3804ef0f992f78f6ca' 
  AND (
    token = '60RVCZizsdDJMOJgwFoIq26XnZf2AexjVgbKZFi4Y6A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034