UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U4LHHse4m0cuIhewXUNonnqrSbERoHZbn9zD2ciLbz0=' 
WHERE 
  key_id = '703f1a38ef6fadf69d5a434874094eb9e47345de692b7cd11aa6dfc676c6b9a9' 
  AND (
    token = 'U4LHHse4m0cuIhewXUNonnqrSbERoHZbn9zD2ciLbz0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054