UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GaVonjCz611rWu3k+HT+6VnU1PyUi1ZeksDNGbk3vFA=' 
WHERE 
  key_id = '34e026c583eb058fc5993fb4a4353c37b3eda9597d1c4854464a2005d2fd0730' 
  AND (
    token = 'GaVonjCz611rWu3k+HT+6VnU1PyUi1ZeksDNGbk3vFA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034