UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IXuaDLziCbDAwK45ctPAE3xvPYAl3l+DUNmLwBAFsI0=' 
WHERE 
  key_id = '5de6d221336cc8ce32ed2a1aa7ab9eebf659b526a64973df17d54df0a968f93f' 
  AND (
    token = 'IXuaDLziCbDAwK45ctPAE3xvPYAl3l+DUNmLwBAFsI0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039