UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fyH+L83kA5p9CKw8r9hc8MHB8kUhYUsHnyRGZB5PvqM=' 
WHERE 
  key_id = '1dca7985db6bc801671da83b67d2b2da6b7cc4c32a6d3d723b9298a53c192a96' 
  AND (
    token = 'fyH+L83kA5p9CKw8r9hc8MHB8kUhYUsHnyRGZB5PvqM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020