UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'W4P0MbM3RwFfHb/ilGYh4UIvBtAKTdLvuB5SuOo6Vu4=' 
WHERE 
  key_id = 'b9f877db2e73d55ac93098e8fcbe2ad79ff0dadd61cf45252b26cdf8d17b6b00' 
  AND (
    token = 'W4P0MbM3RwFfHb/ilGYh4UIvBtAKTdLvuB5SuOo6Vu4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00074