UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's3REDx2OpnQLJTiHrap4CC3hb118VlHh62Mi6lk/CkE=' 
WHERE 
  key_id = '3eaf3a778d4395498cad7630200a1276ee087fca2b1a1fb516eec90aaa192e1f' 
  AND (
    token = 's3REDx2OpnQLJTiHrap4CC3hb118VlHh62Mi6lk/CkE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043