UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/Y8Mb3wgpw4/g2/n6CqrletJYthwdch7thl/Bp8GK6s=' 
WHERE 
  key_id = 'f2231f126e9200c669e8b4b9b0d44c3c45a3e7079f9020aacdc497bba51f8fcd' 
  AND (
    token = '/Y8Mb3wgpw4/g2/n6CqrletJYthwdch7thl/Bp8GK6s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019