UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'p9+lfh2MvECy9rlY2ddpYV72/UYJavWK4w3N/UB86Nk=' 
WHERE 
  key_id = '92e91a9eb89b24b7ee9464379d01e68865ccc49a6a3fcbb6626ed857701ce211' 
  AND (
    token = 'p9+lfh2MvECy9rlY2ddpYV72/UYJavWK4w3N/UB86Nk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030