UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eW8ZRxH7gwy3aPUW4/oIx75oXekDH+1M3TrrWv4MQY0=' 
WHERE 
  key_id = 'de6fbecb6181826f6548de12ed36aba11d4bc492270e569e9ab7b2ff3930b12b' 
  AND (
    token = 'eW8ZRxH7gwy3aPUW4/oIx75oXekDH+1M3TrrWv4MQY0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031