UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'J2M1kr/BXA2kHIveQp2TlrIHyARG96Ru8ZOQ+PEIYMg=' 
WHERE 
  key_id = '41a8485fc7ed299c50251ff7a85d73aca106284d32c8f63133de3709aa4ca3a0' 
  AND (
    token = 'J2M1kr/BXA2kHIveQp2TlrIHyARG96Ru8ZOQ+PEIYMg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035