UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iGnchtr+e/DjxALrDQa98qoJsUYGkaKOcyKfb0zGGEM=' 
WHERE 
  key_id = '108dee37ed65c03ccbedf2dddd2d62a053d627ea04642a0dd219ba82c86dc0b6' 
  AND (
    token = 'iGnchtr+e/DjxALrDQa98qoJsUYGkaKOcyKfb0zGGEM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020