UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QWBnRjERhLUE9kJU566kN1p6/fCCEDdv+JjC3Llhvuc=' 
WHERE 
  key_id = 'eba60171797b669e17b874bf8c03cb3d1971d34530e3a1ffbf31b9413925cd64' 
  AND (
    token = 'QWBnRjERhLUE9kJU566kN1p6/fCCEDdv+JjC3Llhvuc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015