UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7J2ydbI7pGsrFOHLuHZsZz9Wikf7yut6UrXNmw/+7bo=' 
WHERE 
  key_id = 'becfb497f4d3ed31554a9ae2ae735bd7b9bcc6a8dc8afb3bf59695e5ececaedc' 
  AND (
    token = '7J2ydbI7pGsrFOHLuHZsZz9Wikf7yut6UrXNmw/+7bo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033