UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Uh7plc6ZgTDcTWV7A6wmp5jtZGpWMpNebhyZm9zwYyM=' 
WHERE 
  key_id = '0df6a56e602a2ee0bbb3ea1a60dc69ca342510aaf734dae141e368b125ee8c98' 
  AND (
    token = 'Uh7plc6ZgTDcTWV7A6wmp5jtZGpWMpNebhyZm9zwYyM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027